package com.hongyun.tms.common.dto.mcustomer;

import com.alibaba.excel.annotation.ExcelProperty;
import com.hongyun.tms.common.annotation.IsIdCardNumber;
import com.hongyun.tms.common.annotation.excel.ExcelInfo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.io.Serializable;

/**
 * customer 响应
 *
 * @author liPeng
 * @date 2024-05-31
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelInfo(fileName = "客户信息模板")
public class MCustomerTemplateDto implements Serializable {


    @ApiModelProperty(value = "客户名称")
    @NotBlank(message = "客户名称不能为空")
    @Size(max = 40, message = "客户名称最长为40个字符")
    @ExcelProperty(value = "客户名称(必填)", index = 0)
    private String customerName;

    @ApiModelProperty(value = "类型。1个人2企业。个人时填身份证反之纳税号")
    @NotNull(message = "请选择客户类型")
    @ExcelProperty(value = "客户类型(必填)个人/企业，选其一", index = 1)
    private Integer type;

    @ApiModelProperty(value = "纳税人识别号")
    @Size(max = 40, message = "纳税人识别号不能超过40个字符")
    @ExcelProperty(value = "纳税人识别号(企业客户必填，个人不需要填)", index = 2)
    private String tin;

    @ApiModelProperty(value = "身份证号")
    @IsIdCardNumber(message = "身份证格式不正确")
    @Size(max = 18, message = "身份证号最长为18位数")
    @ExcelProperty(value = "身份证号(个人客户必填，企业不需要填)", index = 3)
    private String idNumber;

    @ApiModelProperty(value = "联系人姓名")
    @Size(max = 15, message = "联系人姓名不能超过15个字符")
    @ExcelProperty(value = "联系人姓名", index = 4)
    private String contacts;

    @ApiModelProperty(value = "联系电话")
    @Size(max = 20, message = "联系电话不能超过20个字符")
    @ExcelProperty(value = "联系电话(必填)", index = 5)
    private String tel;

    @ApiModelProperty(value = "联系地址")
    @Size(max = 50, message = "联系地址不能超过50个字符")
    @ExcelProperty(value = "联系地址", index = 6)
    private String address;
}

